#include "interface.hpp"

namespace Test
{
	BaseClass *BaseClass::Factory()
	{
		return new DerivedClass();
	}

	void DoSomething()
	{
		fprintf(stderr, "[G]DoSomething();\n");
	}

	void DoSomething2(short value)
	{
		fprintf(stderr, "[G]DoSomething2(%d);\n", value);
	}

	int Factorial(int x)
	{
		if(x == 0)
			return 1;
		return Factorial(x-1)*x;
	}

	float Square(float x)
	{
		return x*x;
	}

	void DoClass(BaseClass *obj)
	{
		printf("DoClass(%p)\n", obj);
		obj->DoSomething();
	}

	int GlobalVarA = 314596;
}; // namespace Test

void GlobalFunction()
{
	fprintf(stderr, "GlobalFunction().\n");
}

float GlobalVarB = -1.0f;
